<?php
if ($jumlah>0) {
	$total=0;
	$no=1;
	foreach ($penunjang_klaim as $value) { 
	$subtotal = $value['tarif_diminta']*$value['frekuensi_diminta'];?>
	<tr id="divp_<?= $value['id_klaim_penunjang'] ?>">
		<td><?= $no;?></td>
		<td><?= $value['penunjang'] ?></td>
		<td><?= formatRupiahTabel($value['tarif_perda']) ?></td>
		<td align="center"><?= $value['frekuensi_diminta'] ?></td>
		<td><?= formatRupiahTabel($value['tarif_diminta']) ?></td>
		<td><?= formatRupiahTabel($subtotal) ?></td>
		<td>
			<a href="#pilih_penunjang" class="btn btn-xs btn-danger btn-flat" title="Hapus" onclick="hapusPenunjang<?= $value['id_kategori_penunjang'] ?>(<?=$value['id_klaim_penunjang']?>)">
				<i class="fa fa-trash-o"></i> Hapus
			</a>
			<a href="#pilih_penunjang" class="btn btn-xs btn-info btn-flat" title="Edit" onclick="editPenunjang<?= $value['id_kategori_penunjang'] ?>(<?=$value['id_klaim_penunjang']?>)">
				<i class="fa fa-edit"></i> Edit
			</a>
		</td>
	</tr>
	<?php 
	$total=$total+$subtotal;
	$no++;
	} ?>
	<tr>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td align="right"><b>Total</b></td>
		<td><b><?=formatRupiahTabel($total)?></b></td>
		<td></td>
	</tr>
	<?php }else{ ?>
		<tr><td colspan="7" align="center">Tidak ada data</td></tr>
	<?php } ?>